

using UnityEngine.Assertions;

namespace IQIGame.Onigao.GamePlay
{
    public abstract class LevelEntityBaseComponent : TReusableEvtComponent
    {
        public LevelPlayBaseEntity entity { protected set; get; }

        public override void OnCreate(TEntity entity)
        {
            this.entity = entity as LevelPlayBaseEntity;
            Assert.IsNotNull(this.entity, "Not a level LevelPlayRealEntity");
        }

        public override void OnReset()
        {
            base.OnReset();
            entity = null;
        }
    }
}
